<!DOCTYPE html>
<html>
<head>
    <title>后台登录</title>
    <!-- for-mobile-apps -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <!-- //for-mobile-apps -->
    <link href="/css/style.css" rel="stylesheet" type="text/css" media="all"/>
    <script src="http://libs.baidu.com/jquery/2.1.1/jquery.min.js"></script>
</head>
<body>
<!-- main -->
<div class="main">
    <h1>
        最右段子精选后台登录系统
    </h1>
    <form>
        <p>请输入管理员账号</p>
        <input type="text" name="username">
        <p>请输入管理员密码</p>
        <input type="password" name="password">
        <br />
        <input type="button" id="btn" value="登录">
    </form>
</div>
<div class="footer">
    <p>
        &copy 2019 Welcome Login Form. All rights reserved
    </p>
</div>
<!-- //main -->
</body>
<script>
    $(function () {
        $("#btn").click(function () {
            $.ajax({
                url:"/adminLogin",
                type:"post",
                data:$("form").serialize(),
                dataType: "json",
                async:true,
                success:function(data){
                    alert("success");
                },
                error:function(){
                    alert("error");
                }
            })
        })
    })
</script>
</html>